home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / apps / math / ols.zoo / r4.exp < prev    next >
Text File  |  1993-04-15  |  519b  |  29 lines

  1.  
  2. #
  3. # This awk program was generated by ols.
  4. # It reads data from StdIn and prints predictions to StdOut.
  5. #
  6. # It is built for the data layout used when estimating.
  7. # However, this should not be hard to modify.
  8. #
  9.  
  10. {
  11.     x2 = $3;
  12.     _constant = $1;
  13.     y = $4;
  14.  
  15.     predicted = (3.935164*x2) \
  16.         + (6.102074*_constant);
  17.     error = y - predicted;
  18.     print predicted " " y " " error;
  19.     SSE += (error*error);
  20. }
  21.  
  22. END {
  23.     MSE = SSE/NR;
  24.     print "MSE = " MSE ", SSE = " SSE > "/dev/tty";
  25. }
  26.  
  27. # End of generated script.
  28.  
  29.